/*
 * AutoLock.h
 *
 *	Author: stravant
 *	Description:
 *		
 */

#ifndef AUTOLOCK_H_
#define AUTOLOCK_H_

#include <boost/thread/mutex.hpp>

class AutoLock {
public:
	AutoLock(boost::mutex& mutex): mMutex(mutex) {
		mutex.lock();
	}
	~AutoLock() {
		mMutex.unlock();
	}
private:
	boost::mutex& mMutex;
};

#endif /* AUTOLOCK_H_ */
